(0) Obligation:

The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

ordered(Cons(x', Cons(x, xs))) → ordered[Ite](<(x', x), Cons(x', Cons(x, xs)))
ordered(Cons(x, Nil)) → True
ordered(Nil) → True
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs) → ordered(xs)

The (relative) TRS S consists of the following rules:

<(S(x), S(y)) → <(x, y)
<(0, S(y)) → True
<(x, 0) → False
ordered[Ite](True, Cons(x', Cons(x, xs))) → ordered(xs)
ordered[Ite](False, xs) → False

Rewrite Strategy: INNERMOST

(1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed relative TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

ordered(Cons(x', Cons(x, xs))) → ordered[Ite](<(x', x), Cons(x', Cons(x, xs))) [1]
ordered(Cons(x, Nil)) → True [1]
ordered(Nil) → True [1]
notEmpty(Cons(x, xs)) → True [1]
notEmpty(Nil) → False [1]
goal(xs) → ordered(xs) [1]
<(S(x), S(y)) → <(x, y) [0]
<(0, S(y)) → True [0]
<(x, 0) → False [0]
ordered[Ite](True, Cons(x', Cons(x, xs))) → ordered(xs) [0]
ordered[Ite](False, xs) → False [0]

Rewrite Strategy: INNERMOST

(3) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID) transformation)

Renamed defined symbols to avoid conflicts with arithmetic symbols:

< => lt

(4) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

ordered(Cons(x', Cons(x, xs))) → ordered[Ite](lt(x', x), Cons(x', Cons(x, xs))) [1]
ordered(Cons(x, Nil)) → True [1]
ordered(Nil) → True [1]
notEmpty(Cons(x, xs)) → True [1]
notEmpty(Nil) → False [1]
goal(xs) → ordered(xs) [1]
lt(S(x), S(y)) → lt(x, y) [0]
lt(0, S(y)) → True [0]
lt(x, 0) → False [0]
ordered[Ite](True, Cons(x', Cons(x, xs))) → ordered(xs) [0]
ordered[Ite](False, xs) → False [0]

Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

ordered(Cons(x', Cons(x, xs))) → ordered[Ite](lt(x', x), Cons(x', Cons(x, xs))) [1]
ordered(Cons(x, Nil)) → True [1]
ordered(Nil) → True [1]
notEmpty(Cons(x, xs)) → True [1]
notEmpty(Nil) → False [1]
goal(xs) → ordered(xs) [1]
lt(S(x), S(y)) → lt(x, y) [0]
lt(0, S(y)) → True [0]
lt(x, 0) → False [0]
ordered[Ite](True, Cons(x', Cons(x, xs))) → ordered(xs) [0]
ordered[Ite](False, xs) → False [0]

The TRS has the following type information:
ordered :: Cons:Nil → True:False
Cons :: S:0 → Cons:Nil → Cons:Nil
ordered[Ite] :: True:False → Cons:Nil → True:False
lt :: S:0 → S:0 → True:False
Nil :: Cons:Nil
True :: True:False
notEmpty :: Cons:Nil → True:False
False :: True:False
goal :: Cons:Nil → True:False
S :: S:0 → S:0
0 :: S:0

Rewrite Strategy: INNERMOST

(7) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


ordered
notEmpty
goal

(c) The following functions are completely defined:

lt
ordered[Ite]

Due to the following rules being added:

lt(v0, v1) → null_lt [0]
ordered[Ite](v0, v1) → null_ordered[Ite] [0]

And the following fresh constants:

null_lt, null_ordered[Ite]

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

ordered(Cons(x', Cons(x, xs))) → ordered[Ite](lt(x', x), Cons(x', Cons(x, xs))) [1]
ordered(Cons(x, Nil)) → True [1]
ordered(Nil) → True [1]
notEmpty(Cons(x, xs)) → True [1]
notEmpty(Nil) → False [1]
goal(xs) → ordered(xs) [1]
lt(S(x), S(y)) → lt(x, y) [0]
lt(0, S(y)) → True [0]
lt(x, 0) → False [0]
ordered[Ite](True, Cons(x', Cons(x, xs))) → ordered(xs) [0]
ordered[Ite](False, xs) → False [0]
lt(v0, v1) → null_lt [0]
ordered[Ite](v0, v1) → null_ordered[Ite] [0]

The TRS has the following type information:
ordered :: Cons:Nil → True:False:null_lt:null_ordered[Ite]
Cons :: S:0 → Cons:Nil → Cons:Nil
ordered[Ite] :: True:False:null_lt:null_ordered[Ite] → Cons:Nil → True:False:null_lt:null_ordered[Ite]
lt :: S:0 → S:0 → True:False:null_lt:null_ordered[Ite]
Nil :: Cons:Nil
True :: True:False:null_lt:null_ordered[Ite]
notEmpty :: Cons:Nil → True:False:null_lt:null_ordered[Ite]
False :: True:False:null_lt:null_ordered[Ite]
goal :: Cons:Nil → True:False:null_lt:null_ordered[Ite]
S :: S:0 → S:0
0 :: S:0
null_lt :: True:False:null_lt:null_ordered[Ite]
null_ordered[Ite] :: True:False:null_lt:null_ordered[Ite]

Rewrite Strategy: INNERMOST

(9) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(10) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

ordered(Cons(S(x''), Cons(S(y'), xs))) → ordered[Ite](lt(x'', y'), Cons(S(x''), Cons(S(y'), xs))) [1]
ordered(Cons(0, Cons(S(y''), xs))) → ordered[Ite](True, Cons(0, Cons(S(y''), xs))) [1]
ordered(Cons(x', Cons(0, xs))) → ordered[Ite](False, Cons(x', Cons(0, xs))) [1]
ordered(Cons(x', Cons(x, xs))) → ordered[Ite](null_lt, Cons(x', Cons(x, xs))) [1]
ordered(Cons(x, Nil)) → True [1]
ordered(Nil) → True [1]
notEmpty(Cons(x, xs)) → True [1]
notEmpty(Nil) → False [1]
goal(xs) → ordered(xs) [1]
lt(S(x), S(y)) → lt(x, y) [0]
lt(0, S(y)) → True [0]
lt(x, 0) → False [0]
ordered[Ite](True, Cons(x', Cons(x, xs))) → ordered(xs) [0]
ordered[Ite](False, xs) → False [0]
lt(v0, v1) → null_lt [0]
ordered[Ite](v0, v1) → null_ordered[Ite] [0]

The TRS has the following type information:
ordered :: Cons:Nil → True:False:null_lt:null_ordered[Ite]
Cons :: S:0 → Cons:Nil → Cons:Nil
ordered[Ite] :: True:False:null_lt:null_ordered[Ite] → Cons:Nil → True:False:null_lt:null_ordered[Ite]
lt :: S:0 → S:0 → True:False:null_lt:null_ordered[Ite]
Nil :: Cons:Nil
True :: True:False:null_lt:null_ordered[Ite]
notEmpty :: Cons:Nil → True:False:null_lt:null_ordered[Ite]
False :: True:False:null_lt:null_ordered[Ite]
goal :: Cons:Nil → True:False:null_lt:null_ordered[Ite]
S :: S:0 → S:0
0 :: S:0
null_lt :: True:False:null_lt:null_ordered[Ite]
null_ordered[Ite] :: True:False:null_lt:null_ordered[Ite]

Rewrite Strategy: INNERMOST

(11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

Nil => 0
True => 2
False => 1
0 => 0
null_lt => 0
null_ordered[Ite] => 0

(12) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 1 }→ ordered(xs) :|: xs >= 0, z = xs
lt(z, z') -{ 0 }→ lt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x
lt(z, z') -{ 0 }→ 2 :|: z' = 1 + y, y >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: x >= 0, z = x, z' = 0
lt(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 1 }→ ordered[Ite](lt(x'', y'), 1 + (1 + x'') + (1 + (1 + y') + xs)) :|: xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](2, 1 + 0 + (1 + (1 + y'') + xs)) :|: xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](1, 1 + x' + (1 + 0 + xs)) :|: xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 1 }→ ordered[Ite](0, 1 + x' + (1 + x + xs)) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: x >= 0, z = 1 + x + 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 0 }→ ordered(xs) :|: z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: xs >= 0, z = 1, z' = xs
ordered[Ite](z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1

(13) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(14) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 1 }→ ordered(z) :|: z >= 0
lt(z, z') -{ 0 }→ lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 1 }→ ordered[Ite](lt(x'', y'), 1 + (1 + x'') + (1 + (1 + y') + xs)) :|: xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](2, 1 + 0 + (1 + (1 + y'') + xs)) :|: xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](1, 1 + x' + (1 + 0 + xs)) :|: xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 1 }→ ordered[Ite](0, 1 + x' + (1 + x + xs)) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 0 }→ ordered(xs) :|: z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

(15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ lt }
{ notEmpty }
{ ordered[Ite], ordered }
{ goal }

(16) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 1 }→ ordered(z) :|: z >= 0
lt(z, z') -{ 0 }→ lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 1 }→ ordered[Ite](lt(x'', y'), 1 + (1 + x'') + (1 + (1 + y') + xs)) :|: xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](2, 1 + 0 + (1 + (1 + y'') + xs)) :|: xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](1, 1 + x' + (1 + 0 + xs)) :|: xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 1 }→ ordered[Ite](0, 1 + x' + (1 + x + xs)) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 0 }→ ordered(xs) :|: z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {lt}, {notEmpty}, {ordered[Ite],ordered}, {goal}

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: lt
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(18) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 1 }→ ordered(z) :|: z >= 0
lt(z, z') -{ 0 }→ lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 1 }→ ordered[Ite](lt(x'', y'), 1 + (1 + x'') + (1 + (1 + y') + xs)) :|: xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](2, 1 + 0 + (1 + (1 + y'') + xs)) :|: xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](1, 1 + x' + (1 + 0 + xs)) :|: xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 1 }→ ordered[Ite](0, 1 + x' + (1 + x + xs)) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 0 }→ ordered(xs) :|: z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {lt}, {notEmpty}, {ordered[Ite],ordered}, {goal}
Previous analysis results are:
lt: runtime: ?, size: O(1) [2]

(19) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: lt
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(20) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 1 }→ ordered(z) :|: z >= 0
lt(z, z') -{ 0 }→ lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 1 }→ ordered[Ite](lt(x'', y'), 1 + (1 + x'') + (1 + (1 + y') + xs)) :|: xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](2, 1 + 0 + (1 + (1 + y'') + xs)) :|: xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](1, 1 + x' + (1 + 0 + xs)) :|: xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 1 }→ ordered[Ite](0, 1 + x' + (1 + x + xs)) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 0 }→ ordered(xs) :|: z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {notEmpty}, {ordered[Ite],ordered}, {goal}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]

(21) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(22) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 1 }→ ordered(z) :|: z >= 0
lt(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 1 }→ ordered[Ite](s, 1 + (1 + x'') + (1 + (1 + y') + xs)) :|: s >= 0, s <= 2, xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](2, 1 + 0 + (1 + (1 + y'') + xs)) :|: xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](1, 1 + x' + (1 + 0 + xs)) :|: xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 1 }→ ordered[Ite](0, 1 + x' + (1 + x + xs)) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 0 }→ ordered(xs) :|: z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {notEmpty}, {ordered[Ite],ordered}, {goal}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: notEmpty
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(24) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 1 }→ ordered(z) :|: z >= 0
lt(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 1 }→ ordered[Ite](s, 1 + (1 + x'') + (1 + (1 + y') + xs)) :|: s >= 0, s <= 2, xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](2, 1 + 0 + (1 + (1 + y'') + xs)) :|: xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](1, 1 + x' + (1 + 0 + xs)) :|: xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 1 }→ ordered[Ite](0, 1 + x' + (1 + x + xs)) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 0 }→ ordered(xs) :|: z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {notEmpty}, {ordered[Ite],ordered}, {goal}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
notEmpty: runtime: ?, size: O(1) [2]

(25) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: notEmpty
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(26) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 1 }→ ordered(z) :|: z >= 0
lt(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 1 }→ ordered[Ite](s, 1 + (1 + x'') + (1 + (1 + y') + xs)) :|: s >= 0, s <= 2, xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](2, 1 + 0 + (1 + (1 + y'') + xs)) :|: xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](1, 1 + x' + (1 + 0 + xs)) :|: xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 1 }→ ordered[Ite](0, 1 + x' + (1 + x + xs)) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 0 }→ ordered(xs) :|: z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {ordered[Ite],ordered}, {goal}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
notEmpty: runtime: O(1) [1], size: O(1) [2]

(27) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(28) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 1 }→ ordered(z) :|: z >= 0
lt(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 1 }→ ordered[Ite](s, 1 + (1 + x'') + (1 + (1 + y') + xs)) :|: s >= 0, s <= 2, xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](2, 1 + 0 + (1 + (1 + y'') + xs)) :|: xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](1, 1 + x' + (1 + 0 + xs)) :|: xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 1 }→ ordered[Ite](0, 1 + x' + (1 + x + xs)) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 0 }→ ordered(xs) :|: z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {ordered[Ite],ordered}, {goal}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
notEmpty: runtime: O(1) [1], size: O(1) [2]

(29) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: ordered[Ite]
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

Computed SIZE bound using CoFloCo for: ordered
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(30) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 1 }→ ordered(z) :|: z >= 0
lt(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 1 }→ ordered[Ite](s, 1 + (1 + x'') + (1 + (1 + y') + xs)) :|: s >= 0, s <= 2, xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](2, 1 + 0 + (1 + (1 + y'') + xs)) :|: xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](1, 1 + x' + (1 + 0 + xs)) :|: xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 1 }→ ordered[Ite](0, 1 + x' + (1 + x + xs)) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 0 }→ ordered(xs) :|: z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {ordered[Ite],ordered}, {goal}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
notEmpty: runtime: O(1) [1], size: O(1) [2]
ordered[Ite]: runtime: ?, size: O(1) [2]
ordered: runtime: ?, size: O(1) [2]

(31) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using PUBS for: ordered[Ite]
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + z'

Computed RUNTIME bound using CoFloCo for: ordered
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 3 + z

(32) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 1 }→ ordered(z) :|: z >= 0
lt(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 1 }→ ordered[Ite](s, 1 + (1 + x'') + (1 + (1 + y') + xs)) :|: s >= 0, s <= 2, xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](2, 1 + 0 + (1 + (1 + y'') + xs)) :|: xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 1 }→ ordered[Ite](1, 1 + x' + (1 + 0 + xs)) :|: xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 1 }→ ordered[Ite](0, 1 + x' + (1 + x + xs)) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 0 }→ ordered(xs) :|: z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {goal}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
notEmpty: runtime: O(1) [1], size: O(1) [2]
ordered[Ite]: runtime: O(n1) [2 + z'], size: O(1) [2]
ordered: runtime: O(n1) [3 + z], size: O(1) [2]

(33) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(34) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 4 + z }→ s4 :|: s4 >= 0, s4 <= 2, z >= 0
lt(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 7 + x'' + xs + y' }→ s'' :|: s'' >= 0, s'' <= 2, s >= 0, s <= 2, xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 6 + xs + y'' }→ s1 :|: s1 >= 0, s1 <= 2, xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 5 + x' + xs }→ s2 :|: s2 >= 0, s2 <= 2, xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 5 + x + x' + xs }→ s3 :|: s3 >= 0, s3 <= 2, xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 3 + xs }→ s5 :|: s5 >= 0, s5 <= 2, z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {goal}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
notEmpty: runtime: O(1) [1], size: O(1) [2]
ordered[Ite]: runtime: O(n1) [2 + z'], size: O(1) [2]
ordered: runtime: O(n1) [3 + z], size: O(1) [2]

(35) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: goal
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(36) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 4 + z }→ s4 :|: s4 >= 0, s4 <= 2, z >= 0
lt(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 7 + x'' + xs + y' }→ s'' :|: s'' >= 0, s'' <= 2, s >= 0, s <= 2, xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 6 + xs + y'' }→ s1 :|: s1 >= 0, s1 <= 2, xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 5 + x' + xs }→ s2 :|: s2 >= 0, s2 <= 2, xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 5 + x + x' + xs }→ s3 :|: s3 >= 0, s3 <= 2, xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 3 + xs }→ s5 :|: s5 >= 0, s5 <= 2, z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {goal}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
notEmpty: runtime: O(1) [1], size: O(1) [2]
ordered[Ite]: runtime: O(n1) [2 + z'], size: O(1) [2]
ordered: runtime: O(n1) [3 + z], size: O(1) [2]
goal: runtime: ?, size: O(1) [2]

(37) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: goal
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 4 + z

(38) Obligation:

Complexity RNTS consisting of the following rules:

goal(z) -{ 4 + z }→ s4 :|: s4 >= 0, s4 <= 2, z >= 0
lt(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
notEmpty(z) -{ 1 }→ 2 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 1 :|: z = 0
ordered(z) -{ 7 + x'' + xs + y' }→ s'' :|: s'' >= 0, s'' <= 2, s >= 0, s <= 2, xs >= 0, z = 1 + (1 + x'') + (1 + (1 + y') + xs), y' >= 0, x'' >= 0
ordered(z) -{ 6 + xs + y'' }→ s1 :|: s1 >= 0, s1 <= 2, xs >= 0, z = 1 + 0 + (1 + (1 + y'') + xs), y'' >= 0
ordered(z) -{ 5 + x' + xs }→ s2 :|: s2 >= 0, s2 <= 2, xs >= 0, x' >= 0, z = 1 + x' + (1 + 0 + xs)
ordered(z) -{ 5 + x + x' + xs }→ s3 :|: s3 >= 0, s3 <= 2, xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs)
ordered(z) -{ 1 }→ 2 :|: z - 1 >= 0
ordered(z) -{ 1 }→ 2 :|: z = 0
ordered[Ite](z, z') -{ 3 + xs }→ s5 :|: s5 >= 0, s5 <= 2, z = 2, z' = 1 + x' + (1 + x + xs), xs >= 0, x' >= 0, x >= 0
ordered[Ite](z, z') -{ 0 }→ 1 :|: z' >= 0, z = 1
ordered[Ite](z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed:
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
notEmpty: runtime: O(1) [1], size: O(1) [2]
ordered[Ite]: runtime: O(n1) [2 + z'], size: O(1) [2]
ordered: runtime: O(n1) [3 + z], size: O(1) [2]
goal: runtime: O(n1) [4 + z], size: O(1) [2]

(39) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(40) BOUNDS(1, n^1)